<?php
    include('header.php');
    
    $sql = 'SELECT * FROM our_clients WHERE oc_id='.$_GET['oc_id'];
    $result = $db->Execute($sql);
    if($result->RecordCount()>0){
        
        if(img_exists(APPPATH.'/images/clients',$result->fields['oc_path'])){
            $img = '<img src="'.SITEURL.'/images/clients/'.$result->fields['oc_path'].'" /><input type="hidden" name="img_old" value="'.$result->fields['oc_path'].'" /><br />';
        }else{
            $img = '<input type="hidden" name="img_old" value="" />';
        }
?>
    <div class="grid_24" id="contents">
        
        <div id="contents_">
            <form action="?m=our-clients&s=slide-edit_query" method="post" enctype="multipart/form-data">
            <div id="about_us_company_msg_1_th" class="form_field">
                <p>รูป : </p>
                <p class="guideline">ขนาดความสูง 100 pixel</p>
		<?php echo $img; ?>
                <input type="file" name="news_img" class="input large" />
            </div>
            
            <div id="about_us_company_msg_2_en" class="form_field">
		<input type="hidden" name="oc_id" value="<?php echo $result->fields['oc_id']; ?>" />
                <button class="button">SAVE</button>
                <!--<div class="button" onclick="window.location='?m=services&s=packing-dyntecdisc-product'">CANCEL</div>-->
            </div>
            </form>
        </div>
        
    </div><!-- end .grid_18 -->
    <div class="clear">&nbsp;</div>
<?php
    }else{
?>
    <div class="grid_18" id="contents">
        <div id="query_result">
        <?php
            echo 'ไม่มีข้อมูล <img src="images/ajax-loader.gif" />';
            redirect('?m=our-clients',3);
        ?>
        </div>
    </div><!-- end .grid_18 -->
    <div class="clear">&nbsp;</div>
<?php
    }
    include('footer.php');
?>